﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MovieStorage;

namespace DVDFilmoteka.Sorting
{
    class NoneSorter : ISorter
    {
        #region ISorter Members

        public void SaveExpanded(TreeView treeView)
        {
            return;
        }

        public void Sort(TreeView treeView, List<MovieDataStore12> movieList)
        {
            treeView.Nodes.Clear();

            foreach (var item in movieList)
            {
                TreeNode node = !string.IsNullOrEmpty(item.czechName) ? new TreeNode(item.czechName) : new TreeNode(item.originalName);
                node.Tag = item;

                treeView.Nodes.Add(node);
            }
        }

        public ESorters Category()
        {
            return ESorters.ZADNY;
        }

        public string Name()
        {
            return Properties.Messages.sorter_ZADNY;
        }

        #endregion
    }
}
